<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'qjinfoadd.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
   <form  name="f1" method="post" action="qjinfoAdd" onsubmit="return ck()">
						<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#BBD3EB">
							<tr>
                            	<td height="27" align="center" background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">开始日期</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text" id="begindate" name="begindate" size="50" readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
                            	<script type="text/javascript" src="/OA/My97DatePicker/WdatePicker.js" ></script>
                            	</td>
    						</tr>
    						<tr>
                            	<td height="27" align="center" background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">结束日期</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text" id="enddate" name="enddate" size="50" readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
                            	<script type="text/javascript" src="/OA/My97DatePicker/WdatePicker.js" ></script>
                            	</td>
    						</tr>
                          	<tr>
                            	<td height="27" align="center" background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">事由</td>
                            	<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text" id="reason" name="reason" size="80"/></td>
    						</tr>
    						<tr>
    							<td height="27" align="center" background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF"></td>
    							<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="submit" value="提交"/><input type="reset" value="重置"/></td>
    						</tr>
                            <script language="javascript">
                            
                            function ck(){
                            	if(f1.begindate.value==""){
                            		alert("开始日期不能为空");
                            		return false;
                            	}if(f1.enddate.value==""){
                            		alert("结束日期不能为空");
                            		return false;
                            	}
                            	if(f1.reason.value==""){
                            		alert("事由不能为空");
                            		return false;
                            	}
                            }

<%
String suc = (String)request.getAttribute("suc");
if(suc!=null)
{
 %>
 alert("操作成功");
location.replace("/Login/admin/qjinfo.jsp");
 <%}%>
                            </script>
</table>      
</form>                 
</body>
</html>
